﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Plugin.TradeSharp
{
    public partial class UCLStrategyGroupSetting : UserControl
    {
        public UCLStrategyGroupSetting()
        {
            InitializeComponent();
        }

        private void btn_DelProduct_Click(object sender, EventArgs e)
        {

        }

        private void btn_AddTradeGroup_Click(object sender, EventArgs e)
        {
            FormNewTradeGroup form = new FormNewTradeGroup();
            if (form.ShowDialog(this) == DialogResult.OK)
            {
                this.listView_Group.Items.Add(form.TradeGroupName);
            }
        }

        private void btn_AddProduct_Click(object sender, EventArgs e)
        {
            this.listView_ProductInfo.Items.Add("100031");
            this.listView_ProductInfo.Items[0].SubItems.Add("1121");
        }

        private void listView_Group_MouseHover(object sender, EventArgs e)
        {
            Point curPos = this.listView_Group.PointToClient(Control.MousePosition);
            ListViewItem lvwItem = this.listView_Group.GetItemAt(curPos.X, curPos.Y);

            if (lvwItem != null)
            {

                //Console.WriteLine("aa ");
            } 
        }
    }
}
